package com.itheima.myextends.继承特点_01;

//父亲类
public class Father {
    String name;
    int age;

    public void eat(){ System.out.println("吃饭"); }
    public void sleep(){ System.out.println("睡觉"); }
}
//测试类
class Demo{
    public static void main(String[] args) {
        //创建大儿子对象
        Sonl s1 = new Sonl();
        s1.eat();
        s1.coding();

        //创建小儿子对象
        Son2 s2 = new Son2();
        s2.sleep();
        s2.play();
    }
}
